package com.bw.lib_http

import com.zyj.retrofit.adapter.FlowCallAdapterFactory
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory

class TokenRetrofitImpl :BaseRetrofitImpl(){
    override fun createRetrofit(): Retrofit {
        return  Retrofit.Builder()
            .addConverterFactory(GsonConverterFactory.create())
            .addCallAdapterFactory(FlowCallAdapterFactory.create())
            .client(createHttp().addInterceptor{
                it.proceed(
                    it.request().newBuilder().addHeader(Const.TOKEN,"1").build()
                )
            }.build())
            .baseUrl(Const.BASE_URL)
            .build()
    }
}